class TakeLeaveEntity {
  List<TakeLeaveInfo>? rows;

  TakeLeaveEntity({
    this.rows,
  });

  factory TakeLeaveEntity.fromJson(Map<String, dynamic> json) {
    final originList = json['rows'] as List?;
    List<TakeLeaveInfo> protocolList =
        (originList??[]).map((value) => TakeLeaveInfo.fromJson(value)).toList();
    return TakeLeaveEntity(
      rows: protocolList,
    );
  }
}

class TakeLeaveInfo {
  String? customerElderName;
  String? leaveReasonName;
  String? roomNumber; //房号
  int? id;
  String? accompanyName; //陪同家属
  String? leaveRegistrantName;
  String? backRegistrantName;
  String? leaveTime;
  String? planBackTime;
  String? backTime;
  String? validSign; //在住状态
  num? levelDayInt;
  num? leaveDay;
  String? validSignName;
  String? createdDate;
  bool? isSelected;

  TakeLeaveInfo({
    this.backRegistrantName,
    this.leaveRegistrantName,
    this.isSelected = false,
    this.customerElderName,
    this.leaveReasonName,
    this.roomNumber,
    this.id,
    this.accompanyName,
    this.leaveTime,
    this.planBackTime,
    this.backTime,
    this.levelDayInt,
    this.validSignName,
    this.createdDate,
    this.leaveDay,
    this.validSign,
  });

  TakeLeaveInfo.fromJson(Map data) {
    backRegistrantName = data["backRegistrantName"];
    leaveRegistrantName = data["leaveRegistrantName"];
    leaveDay = data["leaveDay"];
    createdDate = data["createdDate"];
    validSignName = data["validSignName"];
    customerElderName = data['customerElderName'];
    leaveReasonName = data['leaveReasonName'];
    roomNumber = data['roomNumber'];
    id = data['id'];
    accompanyName = data['accompanyName'];
    leaveTime = data['leaveTime'];
    planBackTime = data['planBackTime'];
    backTime = data['backTime'];
    levelDayInt = data['levelDayInt'];
    validSign = data["validSign"];
    isSelected = false;
  }
}
